package org.pdai.basic.generics;

public class GenericsDemo24 {
    public static void main(String[] args) {
        Info<String> info = new InfoImpl<>("Tom");
        System.out.println("info.getVar = " + info.getVar());
    }
}

interface Info<T> {
    public T getVar();
}

class InfoImpl<T> implements Info<T> {
    private T var;

    public InfoImpl(T var) {
        this.setVar(var);
    }

    public void setVar(T var) {
        this.var = var;
    }

    public T getVar() {
        return var;
    }
}